package day06.ZiXi;

public class Math01 {
    public static void main(String[] args) {
        //public static int   abs(int a)返回参数的绝对值
        int abs = Math.abs(-10);
        System.out.println(abs);
        //public static double ceil(double a)返回大于或等于参数的最小double值，等于一个整数
        double ceil = Math.ceil(10.1);
        System.out.println(ceil);
        //public static double floor(double a)返回小于或等于参数的最大double值，等于一个整数
        double floor = Math.floor(10.9);
        System.out.println(floor);
        //public   static int round(float a)按照四舍五入返回最接近参数的int
        long round = Math.round(10.5);
        long round1 = Math.round(10.4);
        System.out.println(round);
        System.out.println(round1);
        //public static int   max(int a,int b)返回两个int值中的较大值
        int max = Math.max(15, 20);
        System.out.println(max);
        //public   static int min(int a,int b)返回两个int值中的较小值
        double min = Math.min(10.7, 60.5);
        System.out.println(min);
        //public   static double pow (double a,double b)返回a的b次幂的值
        double pow = Math.pow(94, 54);
        System.out.println(pow);
        //public   static double random()返回值为double的正值，[0.0,1.0)
        double random = Math.random();
        for (int i = 0;i < 10 ;i++) {
            System.out.println(random);
        }
    }
}
